# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils distutils

DESCRIPTION="Sun grid engine."
HOMEPAGE="http://www.mcs.anl.gov/fl/research/accessgrid/"
MPV=(${PV//[._]/ })
MY_PV="V${MPV[0]}${MPV[1]}u${MPV[2]}_TAG"
SRC_URI="http://gridengine.sunsource.net/files/documents/7/1/${PN}-${MY_PV}-src.tar.gz"
LICENSE="SISSL"
SLOT="0"
KEYWORDS="x86"
IUSE=doc""
DEPEND=">=python-2.3
	app-arch/unzip
	app-arch/zip"
S=${WORKDIR}/gridengine

src_compile() {
	local myconf
	myconf="-qmake -gcc  -no-secure -no-qmon"
	cd ${S}/source
	./aimk -only-depend
	./scripts/zerodepend
	cd ${S}/source
	./aimk depend ${myconf}
	cd 3rdparty/qmon
	../../aimk depend
	cd ${S}/source
	./aimk "${myconf}"
}

src_install() {
	cd ${S}/source
	./aimk install        
}
